<?php
/**
 * Manageaccount_Model_Accesslevel
 * access level decision model
 * @author adrian
 */
class Manageaccount_Model_Accesslevel implements Manageaccount_Model_Mainable {
    
    /**
     *
     * @var type $access_level
     * access level handler
     */
    public $access_level;
    /**
     *
     * @var type $redirect_action
     */
    public $redirect_action;
    
    /**
     * constructor()
     */
    public function __construct() {
        $this->access_level = new Core_Model_Accesslevel;
    }
    
    /**
     * main()
     * access level decision
     * 
     * @param array $variables
     */
    public function main(array $variables = null) {
        $page_access_level = $this->access_level->main($variables);
        if($page_access_level['access_level_type'] < 1){
            $this->redirect_action = new Login_Data_Loginredirect;
            $this->redirect_action->main($variables);
        }
    }

}
